Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

204
Vistas
Error while importing electron in react | import { ipcRenderer } from 'electron'

I have created a simple react app with create-react-app and I have integrated it with electron successfully. Everything was working great until I tried to import electron inside the action creator file. If I remove the line below, the app works fine. The problem is that I can't use the ipcRenderer to communicate from the react side to the electron main process.

This line causes the app to crash: import { ipcRenderer } from 'electron';

I get the following error:

TypeError: fs.existsSync is not a function (anonymous function) node_modules/electron/index.js:6

3 | 4 | var pathFile = path.join(__dirname, 'path.txt') 5 |

6 | if (fs.existsSync(pathFile)) { 7 | module.exports = path.join(__dirname, fs.readFileSync(pathFile, 'utf-8')) 8 | } else { 9 | throw new Error('Electron failed to install correctly, please delete node_modules/electron and try installing again')

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda